<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<head th:replace="~{home :: head}"></head>

<body>
<div th:replace="~{home :: bar}"></div>
<div class="container">
    <form action="/user/list" method="post">
        <label>Name:</label>
        <input type="text" name="name">
        <label>Age:</label>
        <input type="text" name="age">
        <input type="submit" value="search">
    </form>
    <table border="1">
        <thead>
        <tr>
            <th>id</th>
            <th>Name</th>
            <th>age</th>
            <th>Delete</th>
        </tr>
        </thead>
        <tr th:each="user:${users}">
            <td th:text="${user.getId()}"></td>
            <td th:text="${user.getName()}"></td>
            <td th:text="${user.getAge()}"></td>
            <td><a class="button" th:href="@{/user/delete/{id}(id=${user.getId()})}">Delete</a> <a class="button" th:href="@{/user/update/{id}(id=${user.getId()})}">Update</a>
            </td>
        </tr>
    </table>
    <a class="button" style="margin-top: 10px" th:href="@{/user/create}">Create</a>
</div>
</body>
</html>